(require 'less)
(require 'sql)
(require 'psvn)
(require 'cal-china-x)
(require 'ibuffer)
(require 'mouse+)
(require 'ess-site)
(require 'boxquote)
(require 'eshell)
(require 'cuda-mode)
(require 'fvwm-mode)

(setq transient-mark-mode t)
(setq diff-switches "-u")
(setq default-mode 'lisp-interaction-mode)
(setq ediff-window-setup-function 'ediff-setup-windows-plain)
(setq next-line-add-newlines t)
(setq visible-bell t)
(setq woman-use-own-frame nil)
(setq inhibit-startup-message t)
(setq column-number-mode t)
(setq mouse-yank-at-point t)
(setq kill-ring-max 200)
(setq fill-column 60)
(setq-default indent-tabs-mode nil)
(setq tab-width 8)
(setq doc-view-resolution 500)
(setq-default truncate-partial-width-windows nil)
(fset 'yes-or-no-p 'y-or-n-p)
(show-paren-mode t)
(setq show-paren-style 'parentheses)
(mouse-avoidance-mode 'animate)
(setq frame-title-format emax-frametitle)
(auto-image-file-mode t)
(global-font-lock-mode t)
(setq version-control t)
(setq kept-new-versions 3)
(setq delete-old-versions t)
(setq kept-old-versions 2)
(setq dired-kept-versions 1)
(setq default-directory emax-defaultdir)
(setq line-number-mode t)
(setq enable-recursive-minibuffers t)
(setq scroll-margin 3  scroll-conservatively 10000)
(auto-compression-mode t)
(setq global-font-lock-mode t)
(setq-default kill-whole-line t)
(setq version-control t)
(setq backup-directory-alist emax-backupdir)
(setq Info-additional-directory-list emax-infodir)
(setq diary-file emax-diary)
(setq mlint-programs emax-mlint)
(setq doc-view-cache-directory emax-docviewdir)
(setq backup-by-copying t)
(setq make-backup-files nil)
(setq auto-save-mode nil)
(setq require-final-newline t)
(setq transient-mark-mode t)
(setq track-eol t)
(when (fboundp 'global-font-lock-mode)
  (global-font-lock-mode t))


(setq sentence-end "\\([。！？]\\|……\\|[.?!][]\"')}]*\\($\\|[ \t]\\)\\)[ \t\n]*")
(setq sentence-end-double-space nil)

(autoload 'css-mode "css-mode" "CSS editing mode" t)
(autoload 'run-scheme "quack" "Quack scheme editing mode" t)
(autoload 'scheme-mode "quack" "Quack scheme editing mode" t)
(autoload 'javascript-mode "javascript" nil t)
(autoload 'geben "geben" "DBGp protocol frontend, a script debugger" t)

(put 'set-goal-column 'disabled nil)
(put 'narrow-to-region 'disabled nil)
(put 'upcase-region 'disabled nil)
(put 'downcase-region 'disabled nil)


(setq abbrev-all-caps t)
(setq abbrev-mode t)
(setq textmate-mode t)
(setq default-input-method "german")
(setq font-use-system-font t)
(setq make-pointer-invisible nil)
(setq fancy-splash-image emax-image)
(setq initial-buffer-choice t)
(setq hs-isearch-open t)
(setq only-global-abbrevs t)
(set-fringe-mode 0)
(setq auto-mode-alist
      (append '(
					;                ("/\\.[^/]*\\'" . fundamental-mode)
		("\\*scratch\\*" . lisp-interaction-mode)
		("\\.s?html?\\'" . html-mode)
		("\\.asp\\'" . html-mode)
		("\\.phtml\\'" . html-mode)
		("\\.org\\'" . org-mode)
		("\\.xml\\'".  sgml-mode)
		("\\.py\\'".  python-mode)
		("\\.rdf\\'".  sgml-mode)
		("\\.bash\\'" . sh-mode)
		("\\.zsh\\'" . sh-mode)
		("\\.session\\'" . emacs-lisp-mode)
		("\\.l\\'" . c-mode)
		("\\.cfm\\'" . html-mode)
		("\\.gnus\\'" . emacs-lisp-mode)
		("\\.idl\\'" . idl-mode)
		("\\.cu\\'" . cuda-mode)
		("\\.js\\'" . javascript-mode)
		("\\.css\\'" . css-mode))
	      auto-mode-alist))


;;;;;;;;;;;;;;;;;;;;  junk  ;;;;;;;;;;;;;;;;;;;;
;;(setq Man-notify-method 'pushy)
;; (setq ispell-local-dictionary "american")
;; (setq ispell-dictionary "american")
;; (setq flyspell-default-dictionary "american")
;; Use hunspell instead of ispell
;;(require 'idb)
;;(require 'sr-speedbar)
;; (eval-when-compile
;;   (when (> emacs-major-version 23)
;;     (start-cedet)))
;;enable visual feedback on selections
;;(setq twitter_user emax-user)
;;(setq twitter_pass emax-pass)
;;copy between X and emacs
;;(setq x-select-enable-clipboard t)
;;(setq interprogram-paste-function 'x-cut-buffer-or-selection-value)
;;(setq process-connection-type nil)
;;(autoload 'notify "notify" "Notify TITLE, BODY.")
;;(diary-fancy-display-mode nil)
;; (setq view-calendar-holidays-initially nil)
;;(setq speedbar-default-position (quote left))
;;(setq speedbar-sort-tags t)
;; (setq mark-holidays-in-calendar t)
;;(minibuffer-indicate-depth-mode 1)
;;(setq fringe-mode 0 nil (fringe))
;; (setq fringe-mode (quote (1 . 1)) nil (fringe))
;; (setq all-hebrew-calendar-holidays t)
